This resource endpoint updates one or more properties of a protected path.
Specify the path id in the {id}
portion of the request URI.
URL Parameters | |
---|---|
format |
The format of the returned data. Can be either json or
xml (default).
|
Request Headers | |
---|---|
Content-type |
The MIME type of the data in the request body. One of the following MIME types:
application/xml , application/json .
|
A successful call to the endpoint returns the HTTP code 204 No Content
.
The server successfully processed the request and is not returning any content.
security
role, or
the following privilege:
http://marklogic.com/xdmp/privileges/manage-admin
The structure of the output returned from this REST API is as follows:
path-id
path-expression
path-namespaces
This is a complex structure with the following children:
path-namespace
This is a complex structure with the following children:
prefix
namespace-uri
permissions
This is a complex structure with the following children:
permission
This is a complex structure with the following children:
role-id
role-name
capability
path-set
Assume properties.xml contains the following data: <protected-path-properties xmlns="http://marklogic.com/manage/protected-path/properties"> <permissions> <permission> <role-name>app-user</role-name> <capability>read</capability> </permission> <permission> <role-name>hadoop-user-write</role-name> <capability>update</capability> </permission> </permissions> </protected-path-properties> curl --anyauth --user username:password -i -X PUT \ -H "Content-type: application/xml" -d @./properties.xml \ http://localhost:8002/manage/v2/protected-paths/14320590660078181486/properties ==> The permissions property of the specified protected path is replaced with that specified in the request body. MarkLogic returns a response similar to the following: HTTP/1.1 204 No Content Server: MarkLogic Content-Type: text/plain; charset=UTF-8 Content-Length: 20 Connection: Keep-Alive Keep-Alive: timeout=5
curl --anyauth --user username:password -i -X PUT -H "Content-type: application/json" \ -d {"permission":[{"role-name":"app-user", "capability":"read"} ]} \ http://localhost:8002/manage/v2/protected-paths/14320590660078181486/properties ==> MarkLogic returns a response similar to the following: HTTP/1.1 204 No Content Server: MarkLogic Content-Type: text/plain; charset=UTF-8 Content-Length: 20 Connection: Keep-Alive Keep-Alive: timeout=5